package ArrayList;
/*
* 存储随机数字
* */
import java.util.ArrayList;
import java.util.Random;

public class ArrayList1 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Random r = new Random();

        for (int i = 0; i < 10; i++) {
            list.add(r.nextInt(100) + 1);
        }

        System.out.println("数组中存的随机数有：");
        for (int j = 0; j < list.size(); j++) {
            System.out.print(list.get(j) + "  ");
        }
    }
}
